@import "../../base.less";

@import "./_var.less";

.@{prefix}-preview {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 1001;
  transform: translateZ(0);
  overflow: hidden;

  .@{prefix}-image-mask {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #0009;
  }

  .preview-index {
    position: absolute;
    bottom: @preview-index-bottom;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: @preview-index-fontsize;
    text-shadow: @preview-index-text-shadow;
    z-index: 101;
  }

  .preview-container {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 1501;
  }

  .relative {
    position: relative;
    top: 0;
    height: 100%;
    width: 100%;
  }

  .preview-items {
    list-style: none;
    left: 0;
    .relative();
  }

  .preview-item-wrap {
    height: auto;
    .relative();

    .item {
      width: 100%;
      display: inline-block;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);

      img {
        width: 100%;
        display: block;
      }
    }
  }
}

.@{prefix}-swiper {
  width: 100%;
  height: 100%;
  position: relative;

  &-box {
    overflow: hidden;
    will-change: tranform;
    width: 100%;
    height: 100%;
    position: relative;
  }

  &-container {
    height: 100%;
    width: auto;
    position: relative;
    box-sizing: initial;
    display: flex;
  }

  &-item {
    position: relative;
    width: 100%;
    flex-shrink: 0;
  }
}
